<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let num = 100; //全局
      function fn() {
        let num = 200;
        num = 300;
        console.log(num);
      }
      fn();

      console.log(num);
    </script>
  </body>
</html>
